<#import "/freemarker/modeltype.ftl" as mt>
<div class="dataTables_title">
	<div class="dataTables_title_left">零售详情</div>
</div>
<div class="widget" style="margin:0px;">
	<div class="widget-content">
		<div class="table-title">
			<input type="hidden" id="apply_code" value="${(ret.code)!''}"/>
			
			<table class="table table-bordered animate2 fadeInUp">
				<tr>
					<td>单据编号:&nbsp;${(sales.dn)!''}</td>
					<td>来往商:&nbsp;${(sales.bname)!''}</td>
				</tr>
				
				<tr>
					<td>退款额:&nbsp;${(sales.total)!''}</td>
					<td>退货类型:&nbsp;<#if sales.type == 1>进货退货<#elseif sales.type == 2>销货退货<#elseif sales.type == 3>零售退货</#if></td>
				</tr>
				<tr>
					<td>创建人:&nbsp;${(sales.cn)!''}</td>
					<td>创建时间:&nbsp;${(sales.ct)!''}</td>
				</tr>
				<tr>
					<td colspan="2">退货原因:&nbsp;${(sales.remark)!''}</td>
				</tr>
			</table>
			
			<table class="table table-bordered animate2 fadeInUp">
			<thead>
					<tr>
						<th>商品名称</th>
						<th>退货数量</th>
						<th>退货单价</th>
						<th>入库仓库</th>
					</tr>
				</thead>
				<tbody>
				<#if sales??>
					<#list sales.itemList as item>
						<tr>
							<td>${(item.cname)!''}</td>
							<td>${(item.count)!''}</td>
							<td>${(item.price)!''}</td>
							<td>${(item.dname)!''}</td>
						</tr>
						<tr>
							<td colspan="5" style="color:green;">序列号:&nbsp;
								<#if (item.detailList?? && item.detailList?size gt 0)>
									<#list item.detailList as detail>
										<div class="filter-table">
											<a href="javascript:;" style="font-weight:bold;">${(detail.serial)!'88'}</a>&nbsp;&nbsp;&nbsp;&nbsp;
										</div>
									</#list>
								<#else>
									<font style="color:red;">此商品不需要序列号</font>&nbsp;
								</#if>
							</td>
						</tr>
						
					</#list>
				</#if>
				<tr>
					<td colspan="5" style="text-align: center">
						<a class="btn btn-info" href="javascript:;" onclick="javascript: $.fn.colorbox.close();">关闭</a>
					</td>
				</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>
